<template>
  <div class="goodsinfo-container">
    <!-- 商品轮播区 -->
    <div class="mui-card">
      <div class="mui-card-content">
        <div class="mui-card-content-inner">
          <swiper :lunbotuList="lunbotuList" :isfull="false"></swiper>
          </div>
      </div>
    </div>

    <!-- 商品购买区 -->
    <div class="mui-card">
      <div class="mui-card-header">{{goodsInfo.title}}</div>
      <div class="mui-card-content">
        <div class="mui-card-content-inner">
          <p class="price">
            市场价: <del>￥{{goodsInfo.maeket_price}}</del>&nbsp;&nbsp;销售价:<span class="now_price">￥{{goodsInfo.sell_price}}</span>
          </p>
          <p>购买数量:<numbox></numbox></p>
          <p>
            <mt-button type="primary" size="small">立即购买</mt-button>
            <mt-button type="danger" size="small">加入购物车</mt-button>
          </p>
          </div>
      </div>
      <!-- <div class="mui-card-footer">页脚</div> -->
    </div>

    <!-- 商品参数区 -->
    <div class="mui-card">
      <div class="mui-card-header">商品参数</div>
      <div class="mui-card-content">
        <div class="mui-card-content-inner">
          <p>商品货号:{{goodsInfo.goods_no}}</p>
          <p>库存情况:{{goodsInfo.stock_quantity}}件</p>
          <p>上架时间:{{goodsInfo.add_time | dateFormat}}</p>
          </div>
      </div>
      <div class="mui-card-footer">
        <mt-button type="primary" size="large" plain>图文介绍</mt-button>
        <mt-button type="danger" size="large" plain>商品评论</mt-button>
        </div>
    </div>

  </div>
</template>
<script>
import swiper from "../subcomponents/swiper.vue"
import numbox from "../subcomponents/goodsinfo_numbox.vue"

export default {
    data(){
        return{
            id:this.$route.params.id,
            lunbotuList:[
                {   
                    url:1,
                    img:'https://m.360buyimg.com/babel/jfs/t1/3/15/4536/138660/5b997bf8Ed72ebce7/819dcf182d743897.jpg!q70.jpg'
                },{
                    url:2,
                    img:'https://m.360buyimg.com/babel/jfs/t1/3/15/4536/138660/5b997bf8Ed72ebce7/819dcf182d743897.jpg!q70.jpg'
                },{
                    url:3,
                    img:'https://m.360buyimg.com/babel/jfs/t1/3/15/4536/138660/5b997bf8Ed72ebce7/819dcf182d743897.jpg!q70.jpg'
                }
            ],
            goodsInfo:{
              add_time:"2015-04-14T17:19:30.000Z",
              goods_no:"SD23424242423",
              market_price:2699,
              sell_price:2199,
              stock_quantity:60,
              title:"小米（MI）小米note 16G双网通版本"
            }
        }
    },
    components:{
       swiper,
       numbox
    },
    created(){

    },
    methods:{
        getLunbotu(){
          this.$http.get("api/getthumimages/"+this.id).then(res=>{

          })
        }
    }
};
</script>
<style lang="less" scoped>
.goodsinfo-container{
    background-color: #eee;
    overflow: hidden;

    .now_price{
      color: red;
      font-size: 16px;
      font-weight: bold;
    }

    .mui-card-footer{
      display: block;
      button{
        margin: 15px 0;
      }
    }
}
</style>
